<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	<script type="text/javascript">
		//1.变量名要符合规范
		var a = 123
		var _name = "zhangsan"
		
		//2.变量类型由赋值决定
		var b = "123"
		console.log(b)
			console.log(typeof b)
		b = 123
		console.log(b)
		console.log(typeof b)
		
		//var也可以不写
		c = "hello"
		console.log(c)
		console.log(typeof c)
		
		// 没有声明 没有赋值 直接用 会报错
		// 02-变量.html:29 UNCAUGHT ReferenceError:d is not defind
		console.log(d)
	</script>
		
	</body>
</html>
